//Made by me (kippieeej aka Bassoe) ^^
//WOMG, CHECK ALL THOSE VARIABLES
//bla lol, womg chicken, i wub chickens =O
var bla = 0;
var bla1 = 0;
var bla2 = 0;
var bla3 = 0;
var lol = 0;
var chicken = 0;
var gmskills = Array(5001000, 5001001, 5001002);
var supergmskills = Array(5101000, 5101001, 5101002, 5101003, 5101004, 5101005);
var beginnerskills = Array(1000, 1001, 1002, 1003, 1004, 1005);
var warriorskills = Array(1000000, 1000001, 1000002, 1001003, 1001004, 1001005);
var mageskills = Array(2000000, 2000001, 2001002, 2001003, 2001004, 2001005);
var bowmanskills = Array(3000000, 3000001, 3000002, 3001003, 3001004, 3001005);
var thiefskills = Array(4000000, 4000001, 4001002, 4001003, 4001334, 4001344);
var fighterskills = Array(1100000, 1100001, 1100002, 1100003, 1101004, 1101005, 1101006, 1101007);
var pageskills = Array(1200000, 1200001, 1200002, 1200003, 1201004, 1201005, 1201006, 1201007);
var spearmanskills = Array(1300000, 1300001, 1300002, 1300003, 1301004, 1301005, 1301006, 1301007);
var fpwizskills = Array(2100000, 2101001, 2101002, 2101003, 2101004, 2101005);
var ilwizskills = Array(2200000, 2201001, 2201002, 2201003, 2201004, 2201005);
var clericskills = Array(2300000, 2301001, 2301002, 2301003, 2301004, 2301005);
var hunterskills = Array(3100000, 3100001, 3101002, 3101003, 3101004, 3101005);
var crossbowmanskills = Array(3200000, 3200001, 3201002, 3201003, 3201004, 3201005);
var assassinskills = Array(4100000, 4100001, 4100002, 4101003, 4101004, 4101005);
var banditskills = Array(4200000, 4200001, 4201002, 4201003, 4201004, 4201005);
var crusaderskills = Array(1110000, 1110001, 1111002, 1111003, 1111004, 1111005, 1111006, 1111007, 1111008);
var whiteknightskills = Array(1210000, 1210001, 1211002, 1211003, 1211004, 1211005, 1211006, 1211007, 1211008, 1211009);
var dragonknightskills = Array(1310000, 1311001, 1311002, 1311003, 1311004, 1311005, 1311006, 1311007, 1311008);
var fpmageskills = Array(2110000, 2110001, 2111002, 2111003, 2111004, 2111005, 2111006);
var ilmageskills = Array(2210000, 2210001, 2211002, 2211003, 2211004, 2211005, 2211006);
var priestskills = Array(2310000, 2311001, 2311002, 2311003, 2311004, 2311005, 2311006);
var rangerskills = Array(3110000, 3110001, 3111002, 3111003, 3111004, 3111005, 3111006);
var sniperskills = Array(3210000, 3210001, 3211002, 3211003, 3211004, 3211005, 3211006);
var hermitskills = Array(4110000, 4111001, 4111002, 4111003, 4111004, 4111005, 4111006);
var cbskills = Array(4210000, 4211001, 4211002, 4211003, 4211004, 4211005, 4211006);
 
function start() {
    bla = -1;
    action(1, 0, 0);
}
 
function action(mode, type, selection) {
    if (mode == -1) {
        cm.dispose();
    } else {
        if (mode == 0 && bla == 0) {
            cm.dispose();
            return;
        }
        if (mode == 1)
            bla++;
        else
            bla--;
        if (bla == 0) {
                cm.sendSimple("Hello #h #, Welcome to #rChickenMS#k\r\nI am here to help you decide your destiny\r\nPick your job!\r\n#L1##bSuper GM#k#l\r\n#L2##rGM#k#l\r\n#L3##bBeginner#k#l\r\n#L4##rwarrior#k#l\r\n#L5##bmage#k#l\r\n#L6##rbowman#k#l\r\n#L7##bthief#k#l");
        } else if (bla == 1) {
            if (selection == 1) {
		lol = supergmskills;
    		var Selstr = "SuperGM Skills are:\r\n";
		for (var i = 0; i < lol.length; i++) {
			Selstr += "#s" + lol[i] + "#";
		}
			cm.sendOk(Selstr);
			cm.dispose();
            } else if (selection == 2) {
		lol = gmskills;
		var Selstr = "GM Skills are:\r\n";
		for (var i = 0; i < lol.length; i++) {
			Selstr += "#s" + lol[i] + "#";
		}
			cm.sendOk(Selstr);
			cm.dispose();
            } else if (selection == 3) {
		lol = beginnerskills;
		var Selstr = "Beginner Skills are:\r\n";
		for (var i = 0; i < lol.length; i++) {
			Selstr += "#s" + lol[i] + "#";
		}
			cm.sendOk(Selstr);
			cm.dispose();
            } else if (selection == 4) {
		lol = warriorskills;
		chicken = 1;
		var Selstr = "Warrior Skills are:\r\n";
		for (var i = 0; i < lol.length; i++) {
			Selstr += "#s" + lol[i] + "#";
		}
			cm.sendNext(Selstr);
	    } else if (selection == 5) {
		lol = mageskills;
		chicken = 2;
		var Selstr = "Mage Skills are:\r\n";
		for (var i = 0; i < lol.length; i++) {
			Selstr += "#s" + lol[i] + "#";
		}
			cm.sendNext(Selstr);
            } else if (selection == 6) {
		lol = bowmanskills;
		chicken = 3;
		var Selstr = "Bowman Skills are:\r\n";
		for (var i = 0; i < lol.length; i++) {
			Selstr += "#s" + lol[i] + "#";
		}
			cm.sendNext(Selstr);
	    } else if (selection == 7) {
		lol = thiefskills;
		chicken = 4;
		var Selstr = "Thief Skills are:\r\n";
		for (var i = 0; i < lol.length; i++) {
			Selstr += "#s" + lol[i] + "#";
		}
			cm.sendNext(Selstr);
            }
	} else if (bla == 2) {
            if (chicken == 1) {
		bla1 = "Warrior #r2nd Job#k skills are:\r\nFighter Skills are:\r\n";
		for (var i = 0; i < fighterskills.length; i++) {
			bla1 += "#s" + fighterskills[i] + "#";
		}
		bla2 = "\r\nPage Skills are:\r\n";
		for (var i = 0; i < pageskills.length; i++) {
			bla2 += "#s" + pageskills[i] + "#";
		}
		bla3 = "\r\nSpearman Skills are:\r\n";
		for (var i = 0; i < spearmanskills.length; i++) {
			bla3 += "#s" + spearmanskills[i] + "#";
		}
		cm.sendNext(bla1 + bla2 + bla3);
            } else if (chicken == 2) {
		bla1 = "Mage #r2nd Job#k skills are:\r\nFire Poison Wizard Skills are:\r\n";
		for (var i = 0; i < fpwizskills.length; i++) {
			bla1 += "#s" + fpwizskills[i] + "#";
		}
		bla2 = "\r\nIce Lightning Wizard Skills are:\r\n";
		for (var i = 0; i < ilwizskills.length; i++) {
			bla2 += "#s" + ilwizskills[i] + "#";
		}
		bla3 = "\r\nCleric Skills are:\r\n";
		for (var i = 0; i < clericskills.length; i++) {
			bla3 += "#s" + clericskills[i] + "#";
		}
		cm.sendNext(bla1 + bla2 + bla3);
            } else if (chicken == 3) {
		bla1 = "Bowman #r2nd Job#k skills are:\r\nHunter Skills are:\r\n";
		for (var i = 0; i < hunterskills.length; i++) {
			bla1 += "#s" + hunterskills[i] + "#";
		}
		bla2 = "\r\nCrossbowman Skills are:\r\n";
		for (var i = 0; i < crossbowmanskills.length; i++) {
			bla2 += "#s" + crossbowmanskills[i] + "#";
		}
		cm.sendNext(bla1 + bla2);
	    } else if (chicken == 4) {
		bla1 = "Thief #r2nd Job#k skills are:\r\nAssassin Skills are:\r\n";
		for (var i = 0; i < assassinskills.length; i++) {
			bla1 += "#s" + assassinskills[i] + "#";
		}
		bla2 = "\r\nBandit Skills are:\r\n";
		for (var i = 0; i < banditskills.length; i++) {
			bla2 += "#s" + banditskills[i] + "#";
		}
		cm.sendNext(bla1 + bla2);
            }
	} else if (bla == 3) {
            if (chicken == 1) {
		bla1 = "Warrior #d3rd Job#k skills are:\r\nCrusader Skills are:\r\n";
		for (var i = 0; i < crusaderskills.length; i++) {
			bla1 += "#s" + crusaderskills[i] + "#";
		}
		bla2 = "\r\nWhite Knight Skills are:\r\n";
		for (var i = 0; i < whiteknightskills.length; i++) {
			bla2 += "#s" + whiteknightskills[i] + "#";
		}
		bla3 = "\r\nDragon Knight Skills are:\r\n";
		for (var i = 0; i < dragonknightskills.length; i++) {
			bla3 += "#s" + dragonknightskills[i] + "#";
		}
		cm.sendNext(bla1 + bla2 + bla3);
            } else if (chicken == 2) {
		bla1 = "Mage #d3rd Job#k skills are:\r\nFire Poison Mage Skills are:\r\n";
		for (var i = 0; i < fpmageskills.length; i++) {
			bla1 += "#s" + fpmageskills[i] + "#";
		}
		bla2 = "\r\nIce Lightning Mage Skills are:\r\n";
		for (var i = 0; i < ilmageskills.length; i++) {
			bla2 += "#s" + ilmageskills[i] + "#";
		}
		bla3 = "\r\npriest Skills are:\r\n";
		for (var i = 0; i < priestskills.length; i++) {
			bla3 += "#s" + priestskills[i] + "#";
		}
		cm.sendNext(bla1 + bla2 + bla3);
            } else if (chicken == 3) {
		bla1 = "Bowman #d3rd Job#k skills are:\r\nRanger Skills are:\r\n";
		for (var i = 0; i < rangerskills.length; i++) {
			bla1 += "#s" + rangerskills[i] + "#";
		}
		bla2 = "\r\nSniper Skills are:\r\n";
		for (var i = 0; i < sniperskills.length; i++) {
			bla2 += "#s" + sniperskills[i] + "#";
		}
		cm.sendNext(bla1 + bla2);
	    } else if (chicken == 4) {
		bla1 = "Thief #d3rd Job#k skills are:\r\nHermit Skills are:\r\n";
		for (var i = 0; i < hermitskills.length; i++) {
			bla1 += "#s" + hermitskills[i] + "#";
		}
		bla2 = "\r\nChief Bandit Skills are:\r\n";
		for (var i = 0; i < cbskills.length; i++) {
			bla2 += "#s" + cbskills[i] + "#";
		}
		cm.sendNext(bla1 + bla2);
            }
	} else if (bla == 4) {
            if (chicken == 1) {
		cm.sendOk("Warrior #e4th Job#n skills:\r\n#eIn progress#n");
		cm.dispose();
            } else if (chicken == 2) {
		cm.sendOk("Mage #e4th Job#n skills:\r\n#eIn progress#n");
		cm.dispose();
            } else if (chicken == 3) {
		cm.sendOk("Bowman #e4th Job#n skills:\r\n#eIn progress#n");
		cm.dispose();
	    } else if (chicken == 4) {
		cm.sendOk("Thief #e4th Job#n skills:\r\n#eIn progress#n");
		cm.dispose();
            } 
        }
    }
}